#ifndef SERIAL_LIBRARY_H
#define SERIAL_LIBRARY_H

#include <php.h>


ZEND_BEGIN_ARG_INFO(arginfo_serialOpen, 0)
    ZEND_ARG_INFO(0, device)
    ZEND_ARG_INFO(0, baud)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO(arginfo_serialClose, 0)
    ZEND_ARG_INFO(0, fd)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO(arginfo_serialPutchar, 0)
    ZEND_ARG_INFO(0, fd)
    ZEND_ARG_INFO(0, c)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO(arginfo_serialPuts, 0)
    ZEND_ARG_INFO(0, fd)
    ZEND_ARG_INFO(0, s)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO(arginfo_serialPrintf, 0)
    ZEND_ARG_INFO(0, fd)
    ZEND_ARG_INFO(0, message)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO(arginfo_serialDataAvial, 0)
    ZEND_ARG_INFO(0, fd)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO(arginfo_serialGetchar, 0)
    ZEND_ARG_INFO(0, fd)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO(arginfo_serialFlush, 0)
    ZEND_ARG_INFO(0, fd)
ZEND_END_ARG_INFO()


PHP_FUNCTION(serialOpen);
PHP_FUNCTION(serialClose);
PHP_FUNCTION(serialPutchar);
PHP_FUNCTION(serialPuts);
PHP_FUNCTION(serialPrintf);
PHP_FUNCTION(serialDataAvail);
PHP_FUNCTION(serialGetchar);
PHP_FUNCTION(serialFlush);

#endif